#![allow(unused_imports, non_snake_case, non_camel_case_types)]
use super::windows::*;
use super::*;

#[repr(C)]
pub struct IDWriteFactory2Vtbl {
	pub parent: IDWriteFactory1Vtbl,
	pub GetSystemFontFallback: unsafe extern "system" fn(This: *mut IDWriteFactory2, fontFallback: *mut *mut IDWriteFontFallback) -> HRESULT,
	pub CreateFontFallbackBuilder: unsafe extern "system" fn(This: *mut IDWriteFactory2, fontFallbackBuilder: *mut *mut IDWriteFontFallbackBuilder) -> HRESULT,
	pub TranslateColorGlyphRun: unsafe extern "system" fn(This: *mut IDWriteFactory2, baselineOriginX: FLOAT, baselineOriginY: FLOAT, glyphRun: *const DWRITE_GLYPH_RUN, glyphRunDescription: *const DWRITE_GLYPH_RUN_DESCRIPTION, measuringMode: DWRITE_MEASURING_MODE, worldToDeviceTransform: *const DWRITE_MATRIX, colorPaletteIndex: UINT32, colorLayers: *mut *mut IDWriteColorGlyphRunEnumerator) -> HRESULT,
	pub CreateCustomRenderingParams: unsafe extern "system" fn(This: *mut IDWriteFactory2, gamma: FLOAT, enhancedContrast: FLOAT, grayscaleEnhancedContrast: FLOAT, clearTypeLevel: FLOAT, pixelGeometry: DWRITE_PIXEL_GEOMETRY, renderingMode: DWRITE_RENDERING_MODE, gridFitMode: DWRITE_GRID_FIT_MODE, renderingParams: *mut *mut IDWriteRenderingParams2) -> HRESULT,
	pub CreateGlyphRunAnalysis: unsafe extern "system" fn(This: *mut IDWriteFactory2, glyphRun: *const DWRITE_GLYPH_RUN, transform: *const DWRITE_MATRIX, renderingMode: DWRITE_RENDERING_MODE, measuringMode: DWRITE_MEASURING_MODE, gridFitMode: DWRITE_GRID_FIT_MODE, antialiasMode: DWRITE_TEXT_ANTIALIAS_MODE, baselineOriginX: FLOAT, baselineOriginY: FLOAT, glyphRunAnalysis: *mut *mut IDWriteGlyphRunAnalysis) -> HRESULT,
}
#[repr(C)]
pub struct IDWriteFactory2 {
	pub lpVtbl: *const IDWriteFactory2Vtbl,
}
impl IDWriteFactory2 {
	#[inline]
	pub unsafe fn GetSystemFontFallback(&self, fontFallback: *mut *mut IDWriteFontFallback) -> HRESULT {
		((*self.lpVtbl).GetSystemFontFallback)(self as *const _ as *mut _, fontFallback)
	}
	#[inline]
	pub unsafe fn CreateFontFallbackBuilder(&self, fontFallbackBuilder: *mut *mut IDWriteFontFallbackBuilder) -> HRESULT {
		((*self.lpVtbl).CreateFontFallbackBuilder)(self as *const _ as *mut _, fontFallbackBuilder)
	}
	#[inline]
	pub unsafe fn TranslateColorGlyphRun(&self, baselineOriginX: FLOAT, baselineOriginY: FLOAT, glyphRun: *const DWRITE_GLYPH_RUN, glyphRunDescription: *const DWRITE_GLYPH_RUN_DESCRIPTION, measuringMode: DWRITE_MEASURING_MODE, worldToDeviceTransform: *const DWRITE_MATRIX, colorPaletteIndex: UINT32, colorLayers: *mut *mut IDWriteColorGlyphRunEnumerator) -> HRESULT {
		((*self.lpVtbl).TranslateColorGlyphRun)(self as *const _ as *mut _, baselineOriginX, baselineOriginY, glyphRun, glyphRunDescription, measuringMode, worldToDeviceTransform, colorPaletteIndex, colorLayers)
	}
	#[inline]
	pub unsafe fn CreateCustomRenderingParams(&self, gamma: FLOAT, enhancedContrast: FLOAT, grayscaleEnhancedContrast: FLOAT, clearTypeLevel: FLOAT, pixelGeometry: DWRITE_PIXEL_GEOMETRY, renderingMode: DWRITE_RENDERING_MODE, gridFitMode: DWRITE_GRID_FIT_MODE, renderingParams: *mut *mut IDWriteRenderingParams2) -> HRESULT {
		((*self.lpVtbl).CreateCustomRenderingParams)(self as *const _ as *mut _, gamma, enhancedContrast, grayscaleEnhancedContrast, clearTypeLevel, pixelGeometry, renderingMode, gridFitMode, renderingParams)
	}
	#[inline]
	pub unsafe fn CreateGlyphRunAnalysis(&self, glyphRun: *const DWRITE_GLYPH_RUN, transform: *const DWRITE_MATRIX, renderingMode: DWRITE_RENDERING_MODE, measuringMode: DWRITE_MEASURING_MODE, gridFitMode: DWRITE_GRID_FIT_MODE, antialiasMode: DWRITE_TEXT_ANTIALIAS_MODE, baselineOriginX: FLOAT, baselineOriginY: FLOAT, glyphRunAnalysis: *mut *mut IDWriteGlyphRunAnalysis) -> HRESULT {
		((*self.lpVtbl).CreateGlyphRunAnalysis)(self as *const _ as *mut _, glyphRun, transform, renderingMode, measuringMode, gridFitMode, antialiasMode, baselineOriginX, baselineOriginY, glyphRunAnalysis)
	}
}
impl core::ops::Deref for IDWriteFactory2 {
	type Target = IDWriteFactory1;
	#[inline]
	fn deref(&self) -> &IDWriteFactory1 {
		unsafe { &*(self as *const IDWriteFactory2 as *const IDWriteFactory1) }
	}
}
impl Interface for IDWriteFactory2 {
	#[inline]
	fn uuidof() -> GUID {
		GUID { Data1: 0x0439fc60, Data2: 0xca44, Data3: 0x4994, Data4: [0x8d, 0xee, 0x3a, 0x9a, 0xf7, 0xb7, 0x32, 0xec] }
	}
}
